﻿@model List<GradesDto>
@{
    Layout = null;
}

<!DOCTYPE html>

<html>
<head>
    <meta name="viewport" content="width=device-width" />
    <title>Index</title>
    <link href="~/lib/bootstrap/css/bootstrap.css" rel="stylesheet" />
</head>
<body>
    <div class="container">
        <div></div>
        <div>
            <table class="table table-bordered">
                <thead>
                    <tr>
                        <th>年级编号</th>
                        <th>班级名称</th>
                        <th>创建时间</th>
                        <th>修改时间</th>
                        <th colspan="2">操作</th>
                    </tr>
                </thead>

                <tbody>
                    @foreach(var i in Model)
                    {
                        <tr>
                            <td>@i.Id</td>
                            <td>@i.Title</td>
                            <td>@i.CreateTime.ToString("yyyy年MM月dd日")</td>
                            <td>@i.UpdateTime.ToString("yyyy年MM月dd日")</td>
                            <td>
                                <a asp-action="Update" asp-controller="Grades" asp-route-id="@i.Id">修改</a>
                            </td>
                            <td>
                                <a asp-action="Delete" asp-controller="Grades" asp-route-id="@i.Id">删除</a>
                            </td>
                        </tr>
                    }
                </tbody>
            </table>
            <div>
                <a asp-action="Add" asp-controller="Grades">新增班级信息</a>
            </div>
        </div>
    </div>
</body>
</html>
